from gameset.phoenicia.base import *


class TaxCollector(Walker):
    color =_ (Yellow.dark)
    speed =_ (6)
    
    def day(self, day, month, year):
        for house in self.tile.nearby(House, radius = 5):
            self.city.money += int(house.earnings)
            house.earnings   = 0


class TaxOffice(StaffedBuilding):
    name       =_ ('Tax Office')
    size       =_ (2)
    cost       =_ (75)
    color      =_ (Yellow.dark.darker)
    staff      =_ (8)
    profession =_ (TaxCollector)
